package com.itic.appbase.framework.xcx.vo;

import java.util.List;

import org.apache.commons.lang3.StringUtils;

public class SubmitOrderVo {
	private String yunId;
	private String reciveName;
	private String recivePhone;
	private String areaId;
	private String reciveAddress;
	private String deliveryTimeType;
	private String deliveryTimeId;
	private String isSelfClaim;
	private Double deliveryFee;
	private Double actualPay;
	private List<GoodOrder> goodOrders;
	private String payType;
	private String openId;
	
	SubmitOrderVo() {
	}
	
	public String getPayType() {
		return payType;
	}
	public void setPayType(String payType) {
		this.payType = payType;
	}
	public String getYunId() {
		return yunId;
	}
	public void setYunId(String yunId) {
		this.yunId = yunId;
	}
	public String getRecivePhone() {
		return recivePhone;
	}
	public void setRecivePhone(String recivePhone) {
		this.recivePhone = recivePhone;
	}
	public String getAreaId() {
		return areaId;
	}

	public void setAreaId(String areaId) {
		this.areaId = areaId;
	}
	public String getReciveAddress() {
		return reciveAddress;
	}
	public void setReciveAddress(String reciveAddress) {
		this.reciveAddress = reciveAddress;
	}
	public String getDeliveryTimeType() {
		return deliveryTimeType;
	}
	public void setDeliveryTimeType(String deliveryTimeType) {
		this.deliveryTimeType = deliveryTimeType;
	}
	public String getDeliveryTimeId() {
		return deliveryTimeId;
	}
	public void setDeliveryTimeId(String deliveryTimeId) {
		this.deliveryTimeId = deliveryTimeId;
	}
	public String getIsSelfClaim() {
		return isSelfClaim;
	}
	public void setIsSelfClaim(String isSelfClaim) {
		this.isSelfClaim = isSelfClaim;
	}
	public Double getDeliveryFee() {
		return deliveryFee;
	}

	public void setDeliveryFee(Double deliveryFee) {
		this.deliveryFee = deliveryFee;
	}

	public Double getActualPay() {
		return actualPay;
	}
	public void setActualPay(Double actualPay) {
		this.actualPay = actualPay;
	}

	public List<GoodOrder> getGoodOrders() {
		return goodOrders;
	}
	public void setGoodOrders(List<GoodOrder> goodOrders) {
		this.goodOrders = goodOrders;
	}
	
	public String getReciveName() {
		return reciveName;
	}
	public void setReciveName(String reciveName) {
		this.reciveName = reciveName;
	}
	
	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public static boolean checkSubmitOrderParams(SubmitOrderVo submitOrderVo) {
		boolean flag =true;
		if(submitOrderVo !=null){
			if(StringUtils.isNoneBlank(submitOrderVo.getRecivePhone(),submitOrderVo.getReciveName(),submitOrderVo.getYunId(),submitOrderVo.getPayType()) && !submitOrderVo.getGoodOrders().isEmpty() && submitOrderVo.getActualPay()!=null) {
				if(StringUtils.isNotEmpty(submitOrderVo.getDeliveryTimeType()) || StringUtils.isNotEmpty(submitOrderVo.getIsSelfClaim()))
					flag= true;
				else
					flag= false;
			}else
				flag=false;
		}else
			flag = false;
		return flag;
	}
	
}	
